﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmLisInsumos.aspx.cs" Inherits="Box.Cliente.Logistica.Insumos.frmLisInsumos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    
 <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
<div class="col-md-12">
        <div class="panel panel-primary">
        <div class="panel-heading"><h3>Listado de Insumos</h3>
                <a href="frmInsumos.aspx?accion=nuevo" class="btn btn-default">Nuevo Insumo</a>
            </div>
            <div class="panel-body">
                <div class="row">
                      <div class="col-lg-12">
                        <div class="input-group">
                        <asp:TextBox ID="txtCriterio" MaxLength="50" CssClass="form-control" runat="server"  placeholder="Ingrese Criterio de Búsqueda" />
				
                           <span class="input-group-btn">
<%--                                <button ID="btnBuscar1"   class="btn btn-default" type="button">Buscar</button>--%>
						        <asp:Button ID="btnBuscar" Text="Buscar" CssClass="btn btn-default"  runat="server"  Height="34px" />
                            </span>
                        </div>
                    </div>
                </div>

                <br/>
                <asp:ListView ID="ListView1" 
                     runat="server" SelectMethod="GetProveedores" 
                    ItemType="Box.Entities.Insumo">
                    <LayoutTemplate>
                        <table class="table table-hover table-condensed">
	                        <thead>
	                            <tr>
	       	                        <th>Nombre</th>
	       	                        <th>Descripción</th>
                                    <th>Stock</th>
	       	                        <th>Medida</th>
                                    <th>Precio</th>
                                    <th>Marca</th>
                                    <th>Acción</th>
	                            </tr>	
	                        </thead>
                            <tbody>
                                <tr id="itemPlaceholder" runat="server"/>
                            </tbody>
	                    </table>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <tr>
                            <td><%# Item.NombreInsumo %></td>
                            <td><%# Item.DescripcionInsumo %></td>
                            <td><%# Item.Stock %></td>
                            <td><%# Item.MedidaInsumo %></td>
                            <td><%# Item.Precio %></td>
                            <td><%# Item.Marca.NombreMarca %></td>
                            <td>
                                <a href="frmInsumos.aspx?accion=editar&id= <%# Item.Id %>" class="glyphicon glyphicon-pencil label label-warning">Editar</a>
                                <a href="frmInsumos.aspx?accion=Eliminar&id= <%# Item.Id %>" class="glyphicon glyphicon-remove label label-danger"
                                                                    onclick="return confirm('Desea Elininar a: <%# Item.NombreInsumo%>');">Eliminar </a>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <EmptyDataTemplate>
                                                         <h3 class="message-error" align="center"><b>No existen Insumos con el criterio de búsqueda.</b></h3>
                    </EmptyDataTemplate>
                </asp:ListView>
            </div>
            <div class="panel-footer"></div>
        </div>       
    </div>

        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnBuscar" EventName="Click"/>
        </Triggers>
    </asp:UpdatePanel>

     
</asp:Content>
